package com.proyemp.entity.classes;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * The primary key class for the rubros_aliados database table.
 * 
 */
@Embeddable
public class RubrosAliadoPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="id_tipo_rubro_aliado")
	private Integer idTipoRubroAliado;

	@Column(name="id_aliado")
	private Integer idAliado;

    public RubrosAliadoPK() {
    }
	public Integer getIdTipoRubroAliado() {
		return this.idTipoRubroAliado;
	}
	public void setIdTipoRubroAliado(Integer idTipoRubroAliado) {
		this.idTipoRubroAliado = idTipoRubroAliado;
	}
	public Integer getIdAliado() {
		return this.idAliado;
	}
	public void setIdAliado(Integer idAliado) {
		this.idAliado = idAliado;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof RubrosAliadoPK)) {
			return false;
		}
		RubrosAliadoPK castOther = (RubrosAliadoPK)other;
		return 
			this.idTipoRubroAliado.equals(castOther.idTipoRubroAliado)
			&& this.idAliado.equals(castOther.idAliado);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.idTipoRubroAliado.hashCode();
		hash = hash * prime + this.idAliado.hashCode();
		
		return hash;
    }
}